<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
	.shuchu{
		height:100px;
		width:100px;
		background-color:red;
		}
	li{
		height:30px;
		width:30px;
		background-color:yellow;
		}
</style>
</head>
<body>
<div id="shuchu">你好</div>
</body>
<script type="text/javascript">
	var a=[55,46,54,35,99,88,75,65,45,89,211,80];
	var b=["a","b","c","c","a","f","e","d"]
/*快速(递归)排序*/
	var f=function paixu(arr){
		if(arr.length<=1){return arr;}
		var mid=Math.floor(arr.length/2);
		var midNum=arr.splice(mid,1)[0];
		var left=[];
		var right=[];
		for(var i=0;i<arr.length;i++){
			if(arr[i]<midNum){
					left.push(arr[i]);
				}
			else{
					right.push(arr[i]);
				}}
			return  paixu(left).concat([midNum],paixu(right))/*递归算法,快速排序*/
	}
/*alert(f(a))*/
/*冒泡排序*/	
	var maopao=function(arr){
		/*var verse;*/
		for(var i=0;i<arr.length;i++){
				for(var j=0;j<arr.length-1;j++){
						/*var verse;*/
						if(arr[j]>arr[j+1]){
								var verse;/**/
								varse=arr[j];
								arr[j]=arr[j+1];
								arr[j+1]=varse
							}
						
					}
			}
			return arr
		}
/*alert(maopao(a))*/
/*如何消除数组里面的重复元素*/
	var chongfu=function(arr){
			arr2=[];
			for(var i=0;i<arr.length;i++){
					if(arr2.indexOf(arr[i])<0){/*因为是弱类型，所以数组中可以包含不同类型*/
							arr2.push(arr[i]);
						}
				}
			return arr2;
		}
/*alert(chongfu(b))*/
/*统计字符串里重复元素出现的次数*/
var arr1=[1,2,3,4,5,6,7,8,9]
for(var i=0;i<arr1.length;i++){
		 if(
		 
		 ){continue;}
		 alert(i)
	}
	
/*var cishu=function(str){
	var b={};
/*alert(str.length)*/
	/*for(var i=0;i<str.length;i++){
		if(b==str[i]){}
		}
	}*/
</script>
</html>
